Hi Dimitry I have attached a script here that does a 2 phase refinement with XYZ files. I hope that should solve your problems! Cheers Mikkel On Monday, 26 December 2022 at 16:49:14 UTC+1 Dimitry Grebenyuk wrote: > Dear all, > > I am trying to set up a two-phase refinement of my PDF data using two > aperiodic structures from .xyz files. I tried adopting the *crystalpdftwophase.py > > *example from GitHub which worked well for me in case of periodic > structures from .cif files. > > This time, I encountered a problem. Usually, for aperiodic structure, I > woud use > > *cdsePDF = PDFContribution("CdSe")* > *cdsePDF.loadData(dataFile)* > *cdseStructure = loadStructure(structureFile)* > *cdsePDF.addStructure("CdSe", cdseStructure, periodic=False)* > *cdseFit = FitRecipe()* > *cdseFit.addContribution(cdsePDF)* > > to set up the refinement. However, the example script *crystalpdftwophase.py > * uses > .setStructure() method of PDFGenerator() object instead of .addStructure() > method of PDFContribution() object. Trying to simply replace one for > another gives TypeError: Unadaptable structure format. > > I would very much appreciate if anyone could give me a hint on how to use > .xyz models for a two-phase refinement. > > Thanks, > Dimitry > > >